Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: copy #time command from Mathlib #93

Closed
wants to merge 1 commit into from

Conversation

alexkeizer
Copy link
Collaborator

@alexkeizer alexkeizer commented Aug 16, 2024

Description:

Copy the #time command, with some adaptations, from Mathlib, since it's very useful in getting rough performance numbers for automation.

License-wise, this should be fine, since both are Apache licensed, but we're waiting on an official answer from Leo on that.

EDIT: Leo confirmed it's fine, but also suggested asking Kim if it's worth upstreaming to core, so I've pinged them. Let's wait for the result of that

License:

By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.

@bollu
Copy link
Collaborator

bollu commented Aug 16, 2024

LGTM, yoink it in. Maybe ask Kim if we can toss it into core :)

@alexkeizer alexkeizer marked this pull request as draft August 16, 2024 20:11
@shigoel
Copy link
Collaborator

shigoel commented Aug 19, 2024

When we bump the toolchain to at least nightly-2024-08-15 where #time was upstreamed, we can snuff out this PR.

@alexkeizer
Copy link
Collaborator Author

We can't really update the toolchain until LeanSAT gets merged completely (or the library gets updated, but that's unlikely to happen). Luckily, the process seems to be going quite quickly: PR 4 out of 6 just got merged

@alexkeizer alexkeizer closed this Aug 19, 2024
@alexkeizer alexkeizer reopened this Aug 19, 2024
shigoel added a commit that referenced this pull request Aug 19, 2024
…sults to the environment (#92)

### Description:

Forewarning: the diff of this one is rather large.

I've implemented a new version of step theorem generation, culminating
in the `genStepEqTheorem` function.

In particular:
- We get rid of the different fetch/decode/exec intermediate lemma,
instead opting to generate the final step theorem in one go. The
bottleneck seems to be kernel checking, so by reducing the number of
theorems sent to the kernel we achieve a good speedup (SHA512 used to
take about 55 seconds for the three generation commands combined, now
it's about 35 seconds).
- In the process, we build a `ProgramInfo` struct, which holds a bunch
of interesting expressions that further proof automation could exploit.
This programInfo is stored in a persistent environment extension, so
that it is persisted in the olean files (hence, making it available to
downstream files).
- While building the previous, I've moved some definitions around and
did other refactors: happy to split those off into their own PR if that
makes reviewing easier.

EDIT: split off #93 for the `#time` command

### Testing:

`make all` succeeded

### License:

By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.

---------

Co-authored-by: Siddharth <[email protected]>
Co-authored-by: Shilpi Goel <[email protected]>
@alexkeizer alexkeizer closed this Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants